﻿<UserControl x:Class="Sonce.Editor.Editor"
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  xmlns:e="clr-namespace:Sonce.Editor">
	<Grid x:Name="LayoutRoot" Width="1280" Height="1024" Margin="0" KeyDown="LayoutRoot_KeyDown" KeyUp="LayoutRoot_KeyUp" SizeChanged="LayoutRoot_SizeChanged" HorizontalAlignment="Left" VerticalAlignment="Top">
		<Grid x:Name="layerContainer" MouseLeftButtonDown="Editor_MouseLeftButtonDown" MouseLeftButtonUp="Editor_MouseLeftButtonUp" MouseMove="Editor_MouseMove" MouseEnter="Editor_MouseEnter" MouseLeave="Editor_MouseLeave" LostMouseCapture="Editor_LostMouseCapture">
			<!-- Bottom-most layer where grid is displayed -->
			<e:Layer x:Name="layerGrid" IsFloating="False" Background="{Binding BackgroundBrush}" StrokeBrush="{Binding GridStrokeBrush}" FillBrush="{Binding GridFillBrush}" Margin="0" />
			<!--#FF162842, #FF2F2F2F, #FF2D2D2D-->

			<!-- Working layer where elements are drawn -->
			<e:Layer x:Name="layerWorking" IsFloating="False" Background="Transparent" StrokeBrush="{Binding WorkingStrokeBrush}" FillBrush="{Binding WorkingFillBrush}" Margin="0" />

			<!-- Floating layers, cleared and redrawn frequently -->
			<e:Layer x:Name="layerPreview" IsFloating="True" Background="Transparent" StrokeBrush="{Binding PreviewStrokeBrush}" FillBrush="{Binding PreviewFillBrush}" Margin="0" />
			<e:Layer x:Name="layerSelect" IsFloating="False" Background="Transparent" StrokeBrush="{Binding SelectStrokeBrush}" FillBrush="{Binding SelectFillBrush}" Margin="0" />
			<e:Layer x:Name="layerHighlight" IsFloating="False" Background="Transparent" StrokeBrush="{Binding HighlightStrokeBrush}" FillBrush="{Binding HighlightFillBrush}" Margin="0" />
			<e:Layer x:Name="layerNodes" IsFloating="False" Background="Transparent" StrokeBrush="{Binding NodeStrokeBrush}" FillBrush="{Binding NodeFillBrush}" Margin="0" />
			<e:Layer x:Name="layerFloat" IsFloating="True" Background="Transparent" Margin="0" />
			<e:Layer x:Name="layerCursor" IsFloating="True" Background="Transparent" StrokeBrush="{Binding CursorStrokeBrush}" FillBrush="{Binding CursorFillBrush}" Margin="0"  />
		</Grid>
	</Grid>
</UserControl>
